﻿#ifndef UAddDevice_H
#define UAddDevice_H

#include <QWidget>
#include "ui_UAddDevice.h"
#include "CBaseNode.h"
#include "CDeviceManager.h"
class UAddDevice : public QWidget
{
	Q_OBJECT

public:
	UAddDevice(CBaseNode* pNode,CDeviceManager *pDeviceManager,QWidget *parent = nullptr);
	~UAddDevice();
	void initUi();
	CBaseDevice *getDevice();
private:
	Ui::UAddDeviceClass ui;
	CBaseNode *m_pParent;
	CBaseDevice *m_pCurrDevice;
	CDeviceManager *m_pDeviceManager;
private slots:
	void slotIndexChangedName(int nIndex);
	void slotAddDev();
	void slotClose();
	// UAddDevice.h
signals:
	void deviceAdded(CBaseNode* device);
};

#endif